home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / comm / misc / OCproFinal_src.lha / ONline_Check414_SRC / ONline_check414.rexx < prev   
OS/2 REXX Batch file  |  1999-01-21  |  57KB  |  1,912 lines

  1. /* $VER: ONline Check V4.14 (11.11.98) (c)1998 A.Teichmann@gmx.net
  2.  
  3. AREXX Source Code von Online Check.
  4. Da Ich mich Programmiertechnisch vom AREXX Trenne, und auf eine andere 
  5. Programmiersprache versuche aufzuspringen, trenne Ich mich hiermit von
  6. dieser "Altlast", die man sowieso nicht einfach so "übersetzen" kann.
  7. Ich werde ein ähnliches Programm leider komplett neu Coden müssen.
  8.  
  9. Wer bisher noch nicht in den Code reingeschielt hat, der hat jetzt 
  10. hiermit die möglichkeit sich diesen Spaghtetti Code reinzuziehen.
  11.  
  12. Letztendlich haben auch die enrom gefakten Keyfiles dazu beigetragen...
  13.  
  14.  */
  15.  
  16.     options results
  17.     parse arg neustart
  18.     NEUstartprg=strip(neustart);plug=0
  19.     if ~exists(NEUstartprg) then NEUstartprg=""
  20.     if exists(NEUstartprg) then NEUstartprg=NEUstartprg
  21.     Call StartOC
  22.     exit
  23.     textsch:
  24.     if g1="<M>" then er1=er1""OLA
  25.     if g1="<J>" then er1=er1""dattt
  26.     if g1="<G>" then er1=er1""MADM
  27.     if g1="<K>" then er1=er1""gdm
  28.     if g1="<E>" then er1=er1""anzahl
  29.     if g1="<R>" then er1=er1""MADM-gdm
  30.     if g1="<P>" then er1=er1""proz
  31.     if g1="<H>" then er1=er1""miami
  32.     if g1="<V>" then er1=er1""gdm-MADM
  33.     if substr(g1,1,1)="<" then i1=1
  34.     if i1=0 then er1=er1""e1
  35.     if substr(g1,1,1)=">" then i1=0
  36.     return er1
  37. startOC:erger=27;plugin=0;if exists("s:ONline_Check.plugin") then do
  38.     plugin=1
  39.     plug=1
  40.     end
  41.     if plugin=0 then if exists("rexx:ONline_Check.plugin") then do
  42.     plugin=1
  43.     plug=2
  44.     end
  45.  
  46.     admdz=trunc(left(date("E"),2));history2="";history="";history1="";MUSSopt=0
  47.     SEARCHid=">KCEHC ENILNO NOV FFIRGUZSGNUNHCEREB RETZTEL<";signo=0;anzsigno=0;lesekey="if seek(inf,0,"E")<1000 then keyiti=15";nulli="guut=0"
  48.     verz="4.14 beta MiamiDX Testversion";seriennummer=0;SMZsec=0;onlinecop="00:00:00";EZT="000000";AZT=EZT;ONLflag=0;ozu="";kompzzg=0;kompzzgcop=0;kompzzg1=0
  49.     fe1="";respoo="rtez_defaultresponse = 0";docenter="rtez_flags = ezreqf_centertext"
  50.     nrek=0;dofont="";nostartprg="";nottot=0;starbef="";response=1009
  51.     anzahlcop=0;anzahl=0;komponline="00:00:00";reziprog="if guut~=0 then if index(regname,'^')~=0 then call schicht"
  52.     plopp=" ONline_Check V"verz" (C) 1997 A.Teichmann@gmx.net"
  53.     defaul=pragma("D") ; ozges=0 ;merker=defaul
  54.     uip=0;gdmg=0;g=defaul;rr="/";fr=rr;NL="0a"x ;tfpfg=12
  55.     nomi=1;opti=0;zop=0;stz=0;local=0
  56.     if right(g,1)=":" then fr="";zhj="ONline_Check.catalog"
  57.     lot=''defaul||fr||zhj''
  58.     if local=0 then IF EXISTS(lot) THEN local=lot
  59.     if local=0 then IF EXISTS("sys:locale/Catalogs/deutsch/ONline_Check.catalog") THEN local="sys:locale/Catalogs/deutsch/ONline_Check.catalog"
  60.     if local=0 then IF EXISTS("S:ONline_Check.catalog") THEN local="S:ONline_Check.catalog"
  61. IF ~EXISTS("libs:rexxreqtools.library") THEN DO
  62.     SAY "Error !"||NL||"need the RexxReqTools.library in LIBS:"
  63.     EXIT
  64.     END
  65.     CALL ADDLIB("rexxreqtools.library",0,-30)
  66.     FONT="topaz";SIZE="8";vgl=((58-11)*((erger/9)*73))||(response)*((49/7)*tfpfg)
  67.     if local=0 then signal umbr
  68.     call open(uo,local,"R")
  69.     q1=strip(readLN(uo))
  70.     q2=strip(readLN(uo))
  71.     locm=upper(strip(substr(readLN(uo),13,7)))
  72.     q4=readLN(uo);q5=readLN(uo);q6=readLN(uo);q7=readLN(uo)
  73.     if left(q1,33)~="## version $VER: ONline_Check 4.0" then local=0
  74.     if q2~="## codeset 0" then local=0
  75.     if local=0 then signal umbrrr
  76.     uua=strip(readLN(uo));uub=strip(readLN(uo));TRITT=strip(readLN(uo))
  77.     buf=strip(readLN(uo));buf=strip(readLN(uo));uuc=strip(readLN(uo))
  78.     uud=strip(readLN(uo));uue=strip(readLN(uo));uuf=strip(readLN(uo))
  79.     uug=strip(readLN(uo));uuh=strip(readLN(uo));uui=strip(readLN(uo))
  80.     uuj=strip(readLN(uo));uuk=strip(readLN(uo));uul=strip(readLN(uo))
  81.     uum=strip(readLN(uo));uun=strip(readLN(uo));uuo=strip(readLN(uo))
  82.     uup=strip(readLN(uo));uuq=strip(readLN(uo));uur=strip(readLN(uo))
  83.     uus=strip(readLN(uo));uut=strip(readLN(uo));uuu=strip(readLN(uo))
  84.     uuv=strip(readLN(uo));uuw=strip(readLN(uo));uux=strip(readLN(uo))
  85.     buf=strip(readLN(uo));buf=strip(readLN(uo));qqa=strip(readLN(uo))
  86.     qqb=strip(readLN(uo));buf=strip(readLN(uo));buf=strip(readLN(uo))
  87.     gd1=strip(readLN(uo));gd2=strip(readLN(uo));gd3=strip(readLN(uo))
  88.     gd4=strip(readLN(uo));buf=strip(readLN(uo));checkk=strip(readLN(uo))
  89.     ssa=strip(readLN(uo));ssb=strip(readLN(uo));buf=strip(readLN(uo))
  90.     ssc=strip(readLN(uo));ssd=strip(readLN(uo));sse=strip(readLN(uo))
  91.     buf=strip(readLN(uo));ssf=strip(readLN(uo));ssg=strip(readLN(uo))
  92.     ssh=strip(readLN(uo));buf=strip(readLN(uo));ssi=strip(readLN(uo))
  93.     ssj=strip(readLN(uo));buf=strip(readLN(uo));ssk=strip(readLN(uo))
  94.     buf=strip(readLN(uo));ssl=strip(readLN(uo));ssm=strip(readLN(uo))
  95.     buf=strip(readLN(uo));ssn=strip(readLN(uo));sso=strip(readLN(uo))
  96.     buf=strip(readLN(uo));ssp=strip(readLN(uo));buf=strip(readLN(uo))
  97.     ssq=strip(readLN(uo));ssr=strip(readLN(uo));sss=strip(readLN(uo))
  98.     sst=strip(readLN(uo));buf=strip(readLN(uo));buf=strip(readLN(uo))
  99.     buf=strip(readLN(uo));ssu=strip(readLN(uo));buf=strip(readLN(uo))
  100.     ssv=strip(readLN(uo));ssw=strip(readLN(uo));ssx=strip(readLN(uo))
  101.     buf=strip(readLN(uo));ssy=strip(readLN(uo));ssz=strip(readLN(uo))
  102.     buf=strip(readLN(uo));ssaa=strip(readLN(uo));ssbb=strip(readLN(uo))
  103.     buf=strip(readLN(uo));ssac=strip(readLN(uo));ssbc=strip(readLN(uo))
  104.     buf=strip(readLN(uo));CHECK2=strip(readLN(uo));buf=strip(readLN(uo))
  105.     ix0=strip(readLN(uo));ix1=strip(readLN(uo));ix2=strip(readLN(uo))
  106.     ix3=strip(readLN(uo));ix4=strip(readLN(uo));ix5=strip(readLN(uo))
  107.     ix6=strip(readLN(uo));ix7=strip(readLN(uo));ix8=strip(readLN(uo))
  108.     ix9=strip(readLN(uo));buf=strip(readLN(uo));CHECK3=strip(readLN(uo))
  109.     buf=strip(readLN(uo));ssbd=strip(readLN(uo));ssbe=strip(readLN(uo))
  110.     call close(uo)
  111.     if locm~="DEUTSCH" then signal umbri
  112.     if checkk~="LOCALE_OC_REQUESTERS" then signal umbri
  113.     if check2~="_RANDOM_REQUESTER_TEXT" then signal umbri
  114.     if check3~="_REQ_ZUSATZ_TEXTE" then signal umbri
  115.     verzonung=0
  116.  
  117. if exists("S:Online_Check.Dat") then do
  118.         call open(ug,"s:online_check.dat","R")
  119.         buf=strip(readLN(ug))
  120.         buf=strip(readLN(ug))
  121.     d=strip(substr(readLN(ug),33))
  122.     JGG =strip(substr(readLN(ug),33))
  123.     NIL=strip(substr(readLN(ug),33))
  124.     temp=strip(substr(readLN(ug),33))
  125.     copyb=strip(substr(readLN(ug),33))
  126.     deleb=strip(substr(readLN(ug),33))
  127.     nilib=strip(substr(readLN(ug),33))
  128.     grenz=strip(substr(readLN(ug),33))
  129.     mpx=strip(substr(readLN(ug),33))
  130.     rpx=strip(substr(readLN(ug),33))
  131.     nipx=strip(substr(readLN(ug),33))
  132.     vpx=strip(substr(readLN(ug),33))
  133.     FONTd=strip(substr(readLN(ug),33))
  134.     Sized=strip(substr(readLN(ug),33))
  135.         buf=strip(readLN(ug))
  136.     cennt=strip(substr(readLN(ug),33))
  137.     aust=strip(substr(readLN(ug),33))
  138.     kom1=strip(substr(readLN(ug),33))
  139.     kom2=strip(substr(readLN(ug),33))
  140.     kom3=strip(substr(readLN(ug),33))
  141.     kom4=strip(substr(readLN(ug),33))
  142.     kom5=strip(substr(readLN(ug),33))
  143.     kom6=strip(substr(readLN(ug),33))
  144.     kom7=strip(substr(readLN(ug),33))
  145.     kom8=strip(substr(readLN(ug),33))
  146.     sdd=strip(substr(readLN(ug),33))
  147.     sdo=strip(substr(readLN(ug),33))
  148.     sdn=strip(substr(readLN(ug),33))
  149.     sds=strip(substr(readLN(ug),33))
  150.     mpx1=strip(substr(readLN(ug),33))
  151.     mpx2=strip(substr(readLN(ug),33))
  152.     mpx3=strip(substr(readLN(ug),33))
  153.     mpx4=strip(substr(readLN(ug),33))
  154.     mpx5=strip(substr(readLN(ug),33))
  155.         buf=strip(readLN(ug))
  156.         buf=strip(readLN(ug))
  157.         buf=strip(readLN(ug))
  158.     TFpfg=strip(substr(readLN(ug),33))
  159.     buf=strip(readLN(ug))
  160.         buf=strip(readLN(ug))
  161.     zt6=strip(substr(readLN(ug),33))
  162.     zt5=strip(substr(readLN(ug),33))
  163.     zt1=strip(substr(readLN(ug),33))
  164.     zt7=strip(substr(readLN(ug),33))
  165.     zt2=strip(substr(readLN(ug),33))
  166.     zt3=strip(substr(readLN(ug),33))
  167.     zt4=strip(substr(readLN(ug),33))
  168.         buf=strip(readLN(ug))
  169.         buf=strip(readLN(ug))
  170.     zt62=strip(substr(readLN(ug),33))
  171.     zt52=strip(substr(readLN(ug),33))
  172.     zt12=strip(substr(readLN(ug),33))
  173.     zt72=strip(substr(readLN(ug),33))
  174.     zt22=strip(substr(readLN(ug),33))
  175.     zt32=strip(substr(readLN(ug),33))
  176.     zt42=strip(substr(readLN(ug),33))
  177.         buf=strip(readLN(ug))
  178.         buf=strip(readLN(ug))
  179.     zt63=strip(substr(readLN(ug),33))
  180.     zt53=strip(substr(readLN(ug),33))
  181.     zt13=strip(substr(readLN(ug),33))
  182.     zt73=strip(substr(readLN(ug),33))
  183.     zt23=strip(substr(readLN(ug),33))
  184.     zt33=strip(substr(readLN(ug),33))
  185.     zt43=strip(substr(readLN(ug),33))
  186.         buf=strip(readLN(ug))
  187.         buf=strip(readLN(ug))
  188.     zt64=strip(substr(readLN(ug),33))
  189.     zt54=strip(substr(readLN(ug),33))
  190.     zt14=strip(substr(readLN(ug),33))
  191.     zt74=strip(substr(readLN(ug),33))
  192.     zt24=strip(substr(readLN(ug),33))
  193.     zt34=strip(substr(readLN(ug),33))
  194.     zt44=strip(substr(readLN(ug),33))
  195.         buf=strip(readLN(ug))
  196.     WoendT =strip(substr(readLN(ug),33))
  197.     SonderT=strip(substr(readLN(ug),33))
  198.         buf=strip(readLN(ug))
  199.     sm1=upper(strip(substr(readLN(ug),33)))
  200.     tv1=strip(substr(readLN(ug),33))
  201.     sm2=upper(strip(substr(readLN(ug),33)))
  202.     tv2=strip(substr(readLN(ug),33))
  203.     sm3=upper(strip(substr(readLN(ug),33)))
  204.     tv3=strip(substr(readLN(ug),33))
  205.     sm4=upper(strip(substr(readLN(ug),33)))
  206.     tv4=strip(substr(readLN(ug),33))
  207.     sm5=upper(strip(substr(readLN(ug),33)))
  208.     tv5=strip(substr(readLN(ug),33))
  209.         buf=strip(readLN(ug))
  210.     SEEkey=strip(substr(readLN(ug),33))
  211.         buf=strip(readLN(ug))
  212.     nostartprg=strip(substr(readLN(ug),33))
  213.     starbef=strip(substr(readLN(ug),33))
  214.         buf=strip(readLN(ug))
  215.         buf=strip(readLN(ug))
  216.     Tonlinetage1=strip(substr(readLN(ug),33))
  217.     Tonline1t1=strip(substr(readLN(ug),33))
  218.     Tonline1t2=strip(substr(readLN(ug),33))
  219.     Tonlinetage2=strip(substr(readLN(ug),33))
  220.     Tonline2t1=strip(substr(readLN(ug),33))
  221.     Tonline2t2=strip(substr(readLN(ug),33))
  222.             buf=strip(readLN(ug))
  223.     Tonlinezzg=strip(substr(readLN(ug),33))
  224.     starttag1=strip(substr(readLN(ug),33))
  225.     zufall=strip(substr(readLN(ug),33))
  226.     MUIreq=strip(substr(readLN(ug),33))
  227.     MUIpfad=strip(substr(readLN(ug),33))
  228.     MUIport=strip(substr(readLN(ug),33))
  229.     MUIrun=strip(substr(readLN(ug),33))
  230.     MUInil=strip(substr(readLN(ug),33))
  231.         buf=strip(readLN(ug))
  232.     maxseek=strip(substr(readLN(ug),33))
  233.     security=strip(substr(readLN(ug),33))
  234.         buf=strip(readLN(ug))
  235.         buf=strip(readLN(ug))
  236.     samzt6=strip(substr(readLN(ug),33))
  237.     samzt5=strip(substr(readLN(ug),33))
  238.     samzt1=strip(substr(readLN(ug),33))
  239.     samzt7=strip(substr(readLN(ug),33))
  240.     samzt2=strip(substr(readLN(ug),33))
  241.     samzt3=strip(substr(readLN(ug),33))
  242.     samzt4=strip(substr(readLN(ug),33))
  243.         call close(ug)
  244.         if datatype(security)="CHAR" then security=0
  245.         if security>1 then security=0
  246.         if datatype(maxseek)="CHAR" then maxseek=0
  247.         if maxseek<0 then maxseek=0  
  248.         muistart=0
  249.         if datatype(muireq)="CHAR" then muireq=0
  250.         if muireq=0 then MUIpfad=""
  251.         if muireq>1 then muireq=1
  252.         if muireq=1 then if ~exists(muipfad) then muireq=0
  253.         if muireq=1 then do
  254.             if MUIport="" then MUIPORT="MUIREXX"
  255.             if MUIrun="" then muirun="c:run"
  256.             if ~exists(muirun) then muirun="c:run"
  257.             if muinil="" then muinil=">nil:"
  258.             end
  259.         if nostartprg~="" then if nostartprg~="EOF" then if exists(nostartprg) then nottot=1
  260.         if starbef~="" then if starbef~="EOF" then if ~exists(starbef) then starbef="" 
  261.         if datatype(sized)= "CHAR" then sized=8
  262.         if sized="" then sized=8
  263.         size=sized
  264.         font=fontd
  265.         dofont="rt_font = "||FONT||".font/"||SIZE
  266.         if datatype(zufall)="CHAR" then zufall=0
  267.         if zufall <0 then zufall =0
  268.         if zufall>1 then zufall=1
  269.         if datatype(Tonlinetage1)~="CHAR" then Tonlinetage1="MON TUE WED THU FRI"
  270.         if datatype(Tonlinetage2)~="CHAR" then Tonlinetage2="SAT SUN"
  271.         if datatype(Tonline1t1)="CHAR" then Tonline1t1="0.08"
  272.         if datatype(Tonline1t2)="CHAR" then Tonline1t2="0.05"
  273.         if datatype(Tonline2t1)="CHAR" then Tonline2t1="0.05"
  274.         if datatype(Tonline2t2)="CHAR" then Tonline2t2="0.05"
  275.         if fontd="" then dofont=""
  276.         if ~exists("fonts:"fontd".font") then dofont=""
  277.         if datatype(seekey)="CHAR" then seekey=0
  278.         if seekey>1 then seekey=0
  279.         if datatype(cennt)="CHAR" then docenter=""
  280.         if cennt="" then docenter=""
  281.         if cennt>1 then docenter=""
  282.         if cennt="0" then docenter=""
  283.         if datatype(tv1)="CHAR" then tv1=1
  284.         if datatype(tv2)="CHAR" then tv2=1
  285.         if datatype(tv3)="CHAR" then tv3=1
  286.         if datatype(tv4)="CHAR" then tv4=1
  287.         if datatype(tv5)="CHAR" then tv5=1
  288.         if datatype(Tonlinezzg)="CHAR" then Tonlinezzg=0
  289.         if Tonlinezzg>1 then Tonlinezzg=1
  290.         if Tonlinezzg<0 then Tonlinezzg=0
  291.         if tv1>5 then tv1=5
  292.         if tv1<1 then tv1=1
  293.         if tv2>5 then tv2=5
  294.         if tv2<1 then tv2=1
  295.         if tv3>5 then tv3=5
  296.         if tv3<1 then tv3=1
  297.         if tv4>5 then tv4=5
  298.         if tv4<1 then tv4=1
  299.         if tv5>5 then tv5=5
  300.         if tv5<1 then tv5=1
  301.         verzonung=1
  302.         if sm1="" then if sm2="" then if sm3="" then if sm4="" then if sm5="" then verzonung=0
  303.         end
  304.     if ~exists("s:online_check.dat") then signal NODAT
  305.     if right(g,1)=":" then rr=""
  306.     zhi="ONline_Check.pref"
  307.     if NEUstartprg~="" then if exists(NEUstartprg) then default=NEUstartprg
  308.     if NEUstartprg~="" then if ~exists(NEUstartprg) then NEUstartprg=""
  309.     if NEUstartprg="" then default=''defaul||rr||zhi''
  310.     if exists(default) then signal losg
  311.     CALL rtezrequest(TRITT||NL||NL||uuc||NL||NL||uua||default||uub||NL||NL||uud||NL||uue||NL||uuf||uua||g||uub||NL||NL||uuj,,plopp,docenter dofont respoo)
  312.     exit
  313. LOSG:
  314.     call close(uo)
  315.     Call Open(inf,default,"R")
  316.     buf= left(readLN(inf),18)
  317.     vortg=1
  318.     if buf = "ONline Check Prefs" then vortg=0
  319.     if vortg=1 then signal NVI
  320.     buf= readLN(inf)
  321.     MXDM=strip(substr(readLN(inf),33))
  322.     b=strip(substr(readLN(inf),33))
  323.     c=strip(substr(readLN(inf),33))
  324.     ZNG=strip(substr(readLN(inf),33))
  325.     REQ=strip(substr(readLN(inf),33,1))
  326.     RUN=strip(substr(readLN(inf),33))
  327.     zsgeb=strip(substr(readLN(inf),33))
  328.     Inetgeb=strip(substr(readLN(inf),33))
  329.     Flag=strip(substr(readLN(inf),33))
  330.     RRWARN=strip(substr(readLN(inf),33))
  331.     schlupf=strip(substr(readLN(inf),33))
  332.     opti=strip(substr(readLN(inf),33))
  333.     logb=c
  334.     turbob=strip(substr(readLN(inf),33))
  335.     stacky=strip(substr(readLN(inf),33))
  336.     nreq=strip(substr(readLN(inf),33))
  337.     ONLwarn=strip(substr(readLN(inf),33))
  338.     ONLlimit=strip(substr(readLN(inf),33))
  339.     ONLschwelle=strip(substr(readLN(inf),33))
  340.     ONLreq=strip(substr(readLN(inf),33))
  341.     normrech=strip(substr(readLN(inf),33))
  342.     starttag2=strip(substr(readLN(inf),33))
  343.     freistunden=strip(substr(readLN(inf),33))
  344.     REGNAME=qqa
  345. Call Close(inf)
  346.     guut=0
  347.     see=1
  348.     dattt=JGG
  349. if aust~="1" then do
  350.     kom1="";kom2="";kom3="";kom4="";kom5="";kom6="";kom7="";kom8=""
  351.     end
  352.     berechtag=0
  353.     if datatype(freistunden)="CHAR" then freistunden="00:00:00"
  354.     if datatype(starttag1)="CHAR" then starttag1=0
  355.     if datatype(starttag2)="CHAR" then starttag2=0
  356.     if starttag1<1 then starttag1=0
  357.     if starttag1>31 then starttag1=0
  358.     if starttag2<1 then starttag2=0
  359.     if starttag2>31 then starttag2=0
  360.     if starttag2~=0 then do
  361.         berechtag=starttag2
  362.         starttag1=0
  363.         end
  364.     if starttag1~=0 then do
  365.         berechtag=starttag1
  366.         starttag2=0
  367.         end
  368.  
  369.     if datatype(ONLwarn)="CHAR" then ONLwarn=0
  370.     if ONLwarn=1 then do
  371.         if substr(ONLlimit,3,1)~=":" then ONLwarn=0
  372.         if substr(ONLlimit,6,1)~=":" then ONLwarn=0
  373.         end
  374.     if ONLwarn=1 then do
  375.         if substr(ONLschwelle,3,1)~=":" then ONLwarn=0
  376.         if substr(ONLschwelle,6,1)~=":" then ONLwarn=0
  377.         end
  378.     if ONLwarn=1 then do
  379.         ONLSCHh=(substr(ONLschwelle,1,2))*60*60
  380.         ONLSCHm=(substr(ONLschwelle,4,2))*60
  381.         ONLSCHs=substr(ONLschwelle,7,2)
  382.         ONLschwelle=ONLSCHh+ONLSCHm+ONLSCHs
  383.  
  384.         ONLlimh=(substr(ONLlimit,1,2))*60*60
  385.         ONLlimm=(substr(ONLlimit,4,2))*60
  386.         ONLlims=substr(ONLlimit,7,2)
  387.         ONLlimit=ONLlimh+ONLlimm+ONLlims
  388.     Lmzh=trunc(ONLlimit/60/60)
  389.     Lmzm=trunc(ONLlimit/60)-(Lmzh*60)
  390.     Lmzs=ONLlimit-(Lmzm*60)-(Lmzh*3600)
  391.     if length(lmzh)=1 then lmzh="0"lmzh
  392.     if length(lmzm)=1 then lmzm="0"lmzm
  393.     if length(lmzs)=1 then lmzs="0"lmzs
  394.     ONLlimitout=lmzh":"lmzm":"lmzs
  395.         end
  396.  
  397.     if datatype(normrech)="CHAR" then normrech=0
  398.     if normrech>=1 then do
  399.         normrech=1
  400.         turbob=0
  401.         opti=0
  402.         end
  403.     if datatype(ONLreq)="CHAR" then ONLreq=0
  404.     if ONLreq>1 then ONLreq=1 
  405.  
  406.     playit=0
  407.     if stacky<=0 then stacky=4096
  408.     if stacky="" then stacky=4096
  409.     if mpx="" then playit=3
  410.     if vpx="" then vpx=0
  411.     if rpx~="" then if ~exists(rpx) then signal PRO3
  412.     if playit=0 then if ~exists(mpx) then signal PRO2
  413.     if mpx~="" then if exists(mpx) then playit=1
  414.     if ~exists(mpx1) then mpx1=""
  415.     if ~exists(mpx2) then mpx2=""
  416.     if ~exists(mpx3) then mpx3=""
  417.     if ~exists(mpx4) then mpx4=""
  418.     if sds="" then sds=gd1
  419.     if sdo="" then sdo=gd2
  420.     if sdd="" then sdd=gd3
  421.     if sdn="" then sdn=gd4
  422.     if turbob="" then turbob=0
  423.     if datatype(turbob)="CHAR" then turbob=0
  424.     if datatype(vpx)="CHAR" then vpx=0
  425.     if grenz="" then grenz=5
  426.     if datatype(grenz)="CHAR" then grenz=5
  427.     if length(JGG)>4 then dattt=substr(date("N"),8,4)
  428.     if JGG="" then dattt=substr(date("N"),8,4)
  429.     if datatype(JGG)="CHAR" then dattt=substr(date("N"),8,4)
  430.     if length(ZNG)>0 then see=0
  431.     if datatype(zsgeb)="CHAR" then zsgeb=0
  432.     if zsgeb="" then zsgeb=0
  433.     if datatype(Inetgeb)="CHAR" then Inetgeb=0
  434.     if Inetgeb="" then Inetgeb=0
  435.     if datatype(flag)= "CHAR" then flag=0
  436.     if flag= "" then flag=0
  437.     if datatype(req)= "CHAR" then req=1
  438.     if req= "" then req=1
  439.     if datatype(nreq)= "CHAR" then nreq=0
  440.     if nreq= "" then nreq=0
  441.     if datatype(MXDM)= "CHAR" then MXDM=0
  442.     if MXDM= "" then MXDM=0
  443.     if datatype(TFpfg)= "CHAR" then TFpfg=0.12
  444.     if TFpfg= "" then TFpfg=0.12
  445.     if datatype(rrwarn)= "CHAR" then rrwarn=0
  446.     if rrwarn="" then rrwarn=0
  447.     if datatype(zt1)= "CHAR" then zt1="90"
  448.     if datatype(zt2)= "CHAR" then zt2="150"
  449.     if datatype(zt3)= "CHAR" then zt3="240"
  450.     if datatype(zt4)= "CHAR" then zt4="240"
  451.     if datatype(zt5)= "CHAR" then zt5="240"
  452.     if datatype(zt6)= "CHAR" then zt6="150"
  453.     if datatype(zt7)= "CHAR" then zt7="90"
  454.     if datatype(samzt1)= "CHAR" then samzt1="150"
  455.     if datatype(samzt2)= "CHAR" then samzt2="150"
  456.     if datatype(samzt3)= "CHAR" then samzt3="240"
  457.     if datatype(samzt4)= "CHAR" then samzt4="240"
  458.     if datatype(samzt5)= "CHAR" then samzt5="240"
  459.     if datatype(samzt6)= "CHAR" then samzt6="150"
  460.     if datatype(samzt7)= "CHAR" then samzt7="150"
  461.     if datatype(TFpfg)= "CHAR" then TFpfg="0.12"
  462.     if datatype(schlupf)= "CHAR"then schlupf=100
  463.     if datatype(opti)= "CHAR"then opti=0
  464.     if opti =0 then turbob=0
  465.     tfpfg=tfpfg*100
  466.     if temp="" then temp="t:"
  467.     temp1=right(temp,1);temp2=""
  468.     if temp1~=":" then if temp1~="/" then temp2="/"
  469.     if temp1~=":" then if index(temp,":")=0 then temp2=":"
  470.     temp=temp||temp2
  471.     if copyb="" then copyb="c:copy"
  472.     if deleb="" then deleb="c:delete"
  473.     bvd=left(date("E"),2)"."left(date("U"),2)"."left(date("O"),2)
  474.     size=sized
  475.     font=fontd
  476.     ztb1=zt1;ztb2=zt2;ztb3=zt3;ztb4=zt4;ztb5=zt5;ztb6=zt6;ztb7=zt7
  477.  
  478.     rwarn=trunc(rrwarn,2)
  479.     MADM=trunc(MXDM,2)
  480.     guut=2
  481.     if ~exists("l:ONline_Check.KEY") then guut=0 
  482.     if guut=0 then signal gamm
  483.     guut=0
  484. Call Open(inf,"l:ONline_Check.KEY","R")
  485.     interpret lesekey ;call seek(inf,0,"B")
  486.     buf=readLN(inf);cod1=readLN(inf);cod1=reverse(cod1)
  487.     cod2=readLN(inf);cod2=reverse(cod2);cod3=readLN(inf);cod3=reverse(cod3)
  488.     cod4=readLN(inf);cod4=reverse(cod4);cod5=readLN(inf);cod5=reverse(cod5)
  489.     cod6=readLN(inf);cod6=reverse(cod6);cod7=readLN(inf);cod7=reverse(cod7)
  490.     wert=strip(readLN(inf));if datatype(wert)="CHAR" then guut=0
  491.     code=cod1||NL||cod2||NL||cod3||NL||cod4||NL||cod5||NL||cod6||NL||cod7
  492.     wert1=hash(code);if left(buf,28)="<KEYFILE für ONLINE Check ab"then guut=5
  493.     fgij="";do i=1 to 9;fgij=fgij||i;end
  494.     if wert~=wert1 then guut=0 
  495.     if guut=0 then signal gamm
  496.     if right(cod7,20)~="31323334353637383930" then signal gamm
  497.     loo=(length(cod7)-20);cod7=left(cod7,loo)
  498.     co=x2c(cod1);co1=x2c(co);lq1=x2c(co1);co=x2c(cod2);co1=x2c(co);lq2=x2c(co1)
  499.     co=x2c(cod3);co1=x2c(co);lq3=x2c(co1);co=x2c(cod4);co1=x2c(co);lq4=x2c(co1)
  500.     co=x2c(cod5);co1=x2c(co);lq5=x2c(co1);co=x2c(cod6);co1=x2c(co);lq6=x2c(co1)
  501.     co=x2c(cod7);co1=x2c(co);lq7=x2c(co1);REGNAME=strip(substr(lq1,19));strmmm=strip(substr(lq2,19));ortmmm=strip(substr(lq3,24))
  502.     tel=strip(substr(lq4,19));plz=strip(substr(lq3,19,5));emmm=strip(substr(lq5,19));plzmmm=strip(substr(lq3,19))
  503.     co=abs(trunc((tel-vgl*plz)/fgij));ce=substr(lq7,19)
  504.     if guut=5 then if co=ce then guut=1
  505.     if guut=5 then guut=0
  506.     if guut=1 then seriennummer=strip(substr(lq7,19));call deutsch
  507.     if seriennummer=102932 then if plzmmm="12345 Ort" then guut=0
  508.     say "ser:"seriennummer
  509.     say "plz:"plzmmm
  510.     interpret reziprog
  511.     if guut=0 then signal gamm
  512.     if locm="DEUTSCH" then if seekey=1 then if guut=1 then do
  513.     rr1="Keyfile für "strip(substr(lq6,19))" oder höher..."
  514.     rr2="Information über Keyfile Inhalt:"||nl
  515.     rr3="Name              :"REGNAME
  516.     rr4="Strasse           :"strmmm
  517.     rr5="PLZ/Ort           :"strip(substr(lq3,19))
  518.     rr6="Email             :"emmm
  519.     rr7="Telefon           :0"tel
  520.     rr8="Seriennummer      :"reverse(strip(substr(lq7,19)))
  521.     CALL rtezrequest(rr1||NL||rr2||nl||rr3||nl||rr4||nl||rr5||nl||rr6||nl||rr7||nl||rr8,,"Informations Requester",dofont respoo)
  522.     end
  523.     if guut~=0 then signal gamm
  524.     guut=0
  525. GAMM:
  526.     call close(inf)
  527.     if keyiti=15 then do
  528.         interpret Nulli ;call existerit
  529.             end
  530.     ee1="";ee2="";ee3="";ee4="";ee5="";ee6="";ee7="";ee8=""
  531.     gpfg=0;preis=0;anzahl=0;fud=0;MD=upper(left(date(m),3))
  532.     i=0;imz=0
  533.     monn="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec"
  534.     gdm="0"
  535.     monnn=qqb
  536.     MDs=strip(d)
  537.     miami=strip(b)
  538.     log=strip(c);interpret reziprog
  539. do i= 1 to 12
  540.     if upper(word(monn,i))=upper(MDs) then MD=upper(MDs)
  541.     end i
  542.     if log=""then signal LRO1
  543.     if miami="" then NOMI=0
  544.     if nomi=0 then security=0
  545.     if nomi=1 then if ~exists(""miami"") then signal MRO2
  546.     if ~exists(""log"") then signal LRO2
  547.     if MDs = "" then MD = upper(left(date(m),3))
  548.     tzu=substr(time("N"),7,2)
  549.     tza=substr(time("N"),4,2)
  550.     tzo=0
  551.     tzi=0
  552.     tzu1=tzu/2
  553.     tzu2=trunc(tzu1)
  554.     tza1=tza/2
  555.     tza2=trunc(tza1)
  556.     if tzu1=tzu2 then tzo=1
  557.     if tza1=tza2 then tzi=1
  558.     if tzo~=tzi then guut=1
  559.     if tzo=tzi then if guut = 0 then req=1
  560.     interpret reziprog
  561. if guut=0 then do
  562.     text=NL" OC ist ein passives Telefon-/kosten/Zeit"nl" berechnungsprogramm mit internen Limit und"nl
  563.     text=text" Sperre..."nl||nl" Wünsche , Logfiles , Bugreports , Ideen"NL
  564.     text=text" per Email an : A.Teichmann@gmx.net"NL||NL" Weiter: [OK]                      Information: [?]"
  565.     buuut=" ? | ? | ? | ? | ? ";x10x=tzu2-((trunc(tzu2/10))*10);if x10x>=5 then x10x=x10x-5
  566.     buuuut=overlay(" OK",buuut,(x10x*4)+1,3);x10x=x10x+1;if x10x=5 then x10x=0
  567.     CALL rtezrequest(plopp" "||nl||text,buuuut,"Zufälliger Nerv Requester",respoo)
  568.     if result ~= x10x then do
  569.         text=NL" Die kosten von Online Check:"nl||nl" Normale User: 5 DM (überweisung,Bar,Briefmarken)"nl
  570.         text=text" Studenten   : 2.5 DM (mit Nachweis !)"NL" jeder andere: 3 Euro (falls er mal kommt)"nl||nl
  571.         text=text" Bitte auf OK ,um weiterzufahren..."
  572.         CALL rtezrequest(plopp" "||nl||text,,"2.Nervrequester", respoo)
  573.         end
  574.     end
  575.     ixr=tzu2-((trunc(tzu2/10))*10)
  576.     if ixr=0 then sss=ix0
  577.     if ixr=1 then sss=ix1
  578.     if ixr=2 then sss=ix2
  579.     if ixr=3 then sss=ix3
  580.     if ixr=4 then sss=ix4
  581.     if ixr=5 then sss=ix5
  582.     if ixr=6 then sss=ix6
  583.     if ixr=7 then sss=ix7
  584.     if ixr=8 then sss=ix8
  585.     if ixr=9 then sss=ix9
  586. do forever
  587.     i=i+1;if i>13 then leave
  588.     if upper(word(monn,i))=MD then leave
  589.     end
  590.     OLA=word(monnn,i)
  591.     mdz=i;mdzbak=i;mdbak=md
  592.     signal secondus
  593.     existerit:
  594.     call close(inf)
  595.     text="NEVER USE FAKED KEYS"
  596.     say text
  597.     file="l:ONline_Check.key"
  598.     if exists(file) then do
  599.     call open(aus1,file,"W")
  600.     call writeln(aus1,text)    
  601.     call close(aus1)
  602.     end
  603.     return
  604. secondus:
  605.     if nrek=1 then do
  606.         mdz=mdzbak
  607.         MD=mdbak
  608.         gdm=0
  609.         gdm1=0
  610.         uip=0
  611.         gdmg=0
  612.         einsum=0
  613.         aussum=0
  614.         zwisum=0
  615.         SM=0
  616.         SMpfg=0
  617.         SMdm=0
  618.         Gpfg=0
  619.         SMZsec=0
  620.         anzahl=0
  621.         kompzzg=0;kompzzgcop=0;kompzzg1=0
  622.         end    
  623.     i=0
  624.     interpret reziprog
  625. do forever
  626.     i=i+1;if i>13 then leave
  627.     if upper(word(monn,i))=MD then leave
  628.     end
  629.     OLA=word(monnn,i)
  630.     mdz=i;mdzbak=i;mdbak=md
  631.  
  632. if normrech=0 then call open(l,log,"R")
  633. if normrech=1 then call OPENNEU
  634.     if opti=1 then call open(loge,temp"Optilog.log","W")
  635. do forever
  636. /* LOGFILE EINLESEN */
  637.     loginbuff=""
  638.     logoutbuff=""
  639.     loginbuffdx=""
  640.     logoutbuffdx=""
  641.     loginbuffn=""
  642.     logoutbuffn=""
  643.     loginbuffo=""
  644.     loginbuffc=""
  645.     loginbuffr=""
  646.     loginbuffm=""
  647.     logoutbuffm=""
  648.     loginbuffp=""
  649.     onlinecop="00:00:00"
  650.     TITLE=0
  651.     zt1=ztb1;zt2=ztb2;zt3=ztb3;zt4=ztb4;zt5=ztb5;zt6=ztb6;zt7=ztb7
  652.     zusatzgeb=0
  653. do forever
  654.     zwischen=""
  655.     loginbutt=upper(ReadLN(l))
  656.     history2=history1
  657.     history1=history0
  658.     history0=history
  659.     history=loginbutt
  660.  
  661.     If EOF(l)then break
  662.     if normrech=1 then if upper(left(loginbutt,45))="<LETZTER BERECHNUNGSZUGRIFF VON ONLINE CHECK>" then loginbuffp=substr(loginbutt,46)
  663.     if upper(left(loginbutt,6))="OCPRO:" then loginbuffr=substr(loginbutt,7)
  664.     if upper(left(loginbutt,3))="OC:" then loginbuffo=substr(loginbutt,4)
  665.     if upper(left(loginbutt,4))="OCP:" then loginbuffc=substr(loginbutt,5)
  666.     
  667.     if upper(left(loginbutt,7))="ONLINE:" then do
  668.                 position=(pos(".",loginbutt))-2
  669.                 loginbuff=substr(loginbutt,position)
  670.                 end
  671.     if upper(left(loginbutt,15))="ACTIVE OFFLINE:" then do
  672.                 position=(pos(".",loginbutt))-2
  673.                 logoutbuff=substr(loginbutt,position)
  674.                 end
  675.     if upper(left(loginbutt,17))="PASSIVE OFFLINE: " then logoutbuff=substr(loginbutt,18)
  676.  
  677.     
  678.     if upper(left(loginbutt,7))="ONLINE(" then do
  679.                         position=(pos(".",loginbutt))-2
  680.                         loginbuffdx=substr(loginbutt,position)
  681.                         end
  682.     if upper(left(loginbutt,15))="ACTIVE OFFLINE(" then do
  683.                 position=(pos(".",loginbutt))-2
  684.                 logoutbuffdx=substr(loginbutt,position)
  685.                 end
  686.     if upper(left(loginbutt,17))="PASSIVE OFFLINE(" then logoutbuffdx=substr(loginbutt,18)
  687.  
  688.     
  689.  
  690.     if upper(left(loginbutt,9))="RECONNECT" then logoutbuff=""
  691.     if upper(left(loginbutt,6))="LOGIN:" then do
  692.                 position=(pos(":",loginbutt,8))-13
  693.                 loginbuffn=substr(loginbutt,position)
  694.                 end
  695.     if upper(left(loginbutt,7))="LOGOUT:" then do
  696.                 position=(pos(":",loginbutt,8))-13
  697.                 logoutbuffn=substr(loginbutt,position)
  698.                 end
  699.     if upper(left(loginbutt,3))="***" then logoutbuffn=right(loginbutt,24)
  700.     if upper(substr(loginbutt,19,9))="NETCALL W" then loginbuffm=left(loginbutt,17)
  701.     if upper(substr(loginbutt,19,11))="NETCALL ERF" then logoutbuffm=left(loginbutt,17)
  702.     if index(loginbutt,ZNG)~=0 then TITLE=1
  703.     if verzonung=1 then do
  704.         TITLE=1
  705.         interpret reziprog
  706.         if index(loginbutt,sm1)~=0 then do
  707.         if tv1=2 then do
  708.             zt1=zt12;zt2=zt22;zt3=zt32;zt4=zt42;zt5=zt52;zt6=zt62;zt7=zt72
  709.             end
  710.         if tv1=3 then do
  711.             zt1=zt13;zt2=zt23;zt3=zt33;zt4=zt43;zt5=zt53;zt6=zt63;zt7=zt73
  712.             end
  713.         if tv1=4 then do
  714.             zt1=zt14;zt2=zt24;zt3=zt34;zt4=zt44;zt5=zt54;zt6=zt64;zt7=zt74
  715.             end
  716.         if tv1=5 then zusatzgeb=1
  717.         end
  718.     if index(loginbutt,sm2)~=0 then do
  719.         if tv2=2 then do
  720.             zt1=zt12;zt2=zt22;zt3=zt32;zt4=zt42;zt5=zt52;zt6=zt62;zt7=zt72
  721.             end
  722.         if tv2=3 then do
  723.             zt1=zt13;zt2=zt23;zt3=zt33;zt4=zt43;zt5=zt53;zt6=zt63;zt7=zt73
  724.             end
  725.         if tv2=4 then do
  726.             zt1=zt14;zt2=zt24;zt3=zt34;zt4=zt44;zt5=zt54;zt6=zt64;zt7=zt74
  727.             end
  728.         if tv2=5 then zusatzgeb=1
  729.         end
  730.     if index(loginbutt,sm3)~=0 then do
  731.         if tv3=2 then do
  732.             zt1=zt12;zt2=zt22;zt3=zt32;zt4=zt42;zt5=zt52;zt6=zt62;zt7=zt72
  733.             end
  734.         if tv3=3 then do
  735.             zt1=zt13;zt2=zt23;zt3=zt33;zt4=zt43;zt5=zt53;zt6=zt63;zt7=zt73
  736.             end
  737.         if tv3=4 then do
  738.             zt1=zt14;zt2=zt24;zt3=zt34;zt4=zt44;zt5=zt54;zt6=zt64;zt7=zt74
  739.             end
  740.         if tv3=5 then zusatzgeb=1
  741.         end
  742.     if index(loginbutt,sm4)~=0 then do
  743.         if tv4=2 then do
  744.             zt1=zt12;zt2=zt22;zt3=zt32;zt4=zt42;zt5=zt52;zt6=zt62;zt7=zt72
  745.             end
  746.         if tv4=3 then do
  747.             zt1=zt13;zt2=zt23;zt3=zt33;zt4=zt43;zt5=zt53;zt6=zt63;zt7=zt73
  748.             end
  749.         if tv4=4 then do
  750.             zt1=zt14;zt2=zt24;zt3=zt34;zt4=zt44;zt5=zt54;zt6=zt64;zt7=zt74
  751.             end
  752.         if tv4=5 then zusatzgeb=1
  753.         end
  754.     if index(loginbutt,sm5)~=0 then do
  755.         if tv5=2 then do
  756.             zt1=zt12;zt2=zt22;zt3=zt32;zt4=zt42;zt5=zt52;zt6=zt62;zt7=zt72
  757.             end
  758.         if tv5=3 then do
  759.             zt1=zt13;zt2=zt23;zt3=zt33;zt4=zt43;zt5=zt53;zt6=zt63;zt7=zt73
  760.             end
  761.         if tv5=4 then do
  762.             zt1=zt14;zt2=zt24;zt3=zt34;zt4=zt44;zt5=zt54;zt6=zt64;zt7=zt74
  763.             end
  764.         if tv5=5 then zusatzgeb=1
  765.         end
  766.     end
  767.     if loginbuffo~="" then leave
  768.     if loginbuffc~="" then leave
  769.     if loginbuffr~="" then leave
  770.     if loginbuffp~="" then leave
  771.     if loginbuffn~=""then if logoutbuffn~="" then leave
  772.     if loginbuffm~=""then if logoutbuffm~="" then leave
  773.     if loginbuff~=""then if logoutbuff~="" then leave
  774.     if loginbuffdx~=""then if logoutbuffdx~="" then leave
  775.     end
  776.     If EOF(l)then break
  777.     if loginbuffo~="" then format="OC"
  778.     if loginbuffc~="" then format="OCP"
  779.     if loginbuffr~="" then format="OCPRO"
  780.     if loginbuffp~="" then format="SIGNED"
  781.     if loginbuffn~="" then if logoutbuffn~="" then format="NCOMM"
  782.     if loginbuff~="" then if logoutbuff~="" then format="MIAMI"
  783.     if loginbuffdx~="" then if logoutbuffdx~="" then format="MIAMIDX"
  784.     if loginbuffm~="" then if logoutbuffm~="" then format="MICRODOT"
  785.     if see=1 then title=1
  786. if format="MIAMI" then do
  787.     itz=substr(loginbuff,1,2)
  788.     otz=substr(logoutbuff,1,2)
  789.     izh=substr(loginbuff,12,2)
  790.     ozh=substr(logoutbuff,12,2)
  791.     izm=substr(loginbuff,15,2)
  792.     ozm=substr(logoutbuff,15,2)
  793.     izs=substr(loginbuff,18,2)
  794.     ozs=substr(logoutbuff,18,2)
  795.     ijz=substr(loginbuff,7,4)
  796.     ojz=substr(logoutbuff,7,4)
  797.     imz=substr(loginbuff,4,2)
  798.     omz=substr(logoutbuff,4,2)
  799.     imn=upper(word(monn,imz))
  800.     omn=upper(word(monn,omz))
  801.     vbm=imn
  802.     dattl=substr(loginbuff,7,4)
  803.     itn=upper(left(date("W",ijz||imz||itz,"S"),3))
  804.     otn=upper(left(date("W",ojz||omz||otz,"S"),3))
  805.     end
  806. if format="MIAMIDX" then do
  807.         itz=substr(loginbuffdx,1,2)
  808.         otz=substr(logoutbuffdx,1,2)
  809.         izh=substr(loginbuffdx,12,2)
  810.         ozh=substr(logoutbuffdx,12,2)
  811.         izm=substr(loginbuffdx,15,2)
  812.         ozm=substr(logoutbuffdx,15,2)
  813.         izs=substr(loginbuffdx,18,2)
  814.         ozs=substr(logoutbuffdx,18,2)
  815.         ijz=substr(loginbuffdx,7,4)
  816.         ojz=substr(logoutbuffdx,7,4)
  817.         imz=substr(loginbuffdx,4,2)
  818.         omz=substr(logoutbuffdx,4,2)
  819.         imn=upper(word(monn,imz))
  820.         omn=upper(word(monn,omz))
  821.         vbm=imn
  822.         dattl=substr(loginbuffdx,7,4)
  823.         itn=upper(left(date("W",ijz||imz||itz,"S"),3))
  824.         otn=upper(left(date("W",ojz||omz||otz,"S"),3))
  825.         end
  826. if format="MICRODOT" then do
  827.     itz=substr(loginbuffm,10,2)
  828.     otz=substr(logoutbuffm,10,2)
  829.     izh=substr(loginbuffm,1,2)
  830.     ozh=substr(logoutbuffm,1,2)
  831.     izm=substr(loginbuffm,4,2)
  832.     ozm=substr(logoutbuffm,4,2)
  833.     izs=substr(loginbuffm,7,2)
  834.     ozs=substr(logoutbuffm,7,2)
  835.     ijz=substr(loginbuffm,16,2)
  836.     ojz=substr(logoutbuffm,16,2)
  837.     if ijz<80 then ijz="20"ijz
  838.     else ijz="19"ijz
  839.     if ojz<80 then ojz="20"ojz
  840.     else ojz="19"ojz
  841.     imz=substr(loginbuffm,13,2)
  842.     omz=substr(logoutbuffm,13,2)
  843.     imn=upper(word(monn,imz))
  844.     vbm=imn
  845.     omn=upper(word(monn,omz))
  846.     dattl=ijz
  847.     itn=upper(left(date("W",ijz||imz||itz,"S"),3))
  848.     otn=upper(left(date("W",ojz||omz||otz,"S"),3))
  849.     end
  850.  
  851. if format="NCOMM" then do
  852.     position=(pos(")",history2))
  853.     position1=(pos("(",history2))
  854.     posii=(position-position1)-1
  855.     if posii<1 then do
  856.         zwischen=history2
  857.         end
  858.     if posii>=1 then ZWISCHEN=(substr(history2,position1+1,posii))
  859.     vbm=upper(substr(loginbuffn,5,3))
  860.     itn=left(loginbuffn,3)
  861.     otn=left(logoutbuffn,3)
  862.     itz=substr(loginbuffn,9,2)
  863.     otz=substr(logoutbuffn,9,2)
  864.     imn=substr(loginbuffn,5,3)
  865.     ji=trunc((index(upper(monn),imn)/4))+1
  866.     if length(ji)=1 then ji="0"ji
  867.     imz=ji
  868.     omn=substr(logoutbuffn,5,3)
  869.     jo=trunc((index(upper(monn),omn)/4))+1
  870.     if length(jo)=1 then jo="0"jo
  871.     omz=jo
  872.     izh=substr(loginbuffn,12,2)
  873.     ozh=substr(logoutbuffn,12,2)
  874.     izm=substr(loginbuffn,15,2)
  875.     ozm=substr(logoutbuffn,15,2)
  876.     izs=substr(loginbuffn,18,2)
  877.     ozs=substr(logoutbuffn,18,2)
  878.     ijz=substr(loginbuffn,21,4)
  879.     ojz=substr(logoutbuffn,21,4)
  880.     dattl=substr(loginbuffn,21,4)
  881.     end
  882. if format="OC" then do
  883.     uip=substr(loginbuffo,10)
  884.     ttz=substr(loginbuffo,1,2)
  885.     itz=0;otz=0;izh=0;ozh=0;izm=0;ozm=0;izs=0;ozs=0;ijz=0
  886.     tjz="19"substr(loginbuffo,7,2);ojz=0;tmz=0;tmz=substr(loginbuffo,4,2);imz=tmz
  887.     omz=0;imn=0;omn=0
  888.     dattl=tjz
  889.     otn=0
  890.     vbm=upper(word(monn,tmz))
  891.     end
  892.  
  893. if format="OCP" then do
  894.     position=(pos(")",loginbuffc))
  895.     position1=(pos("(",loginbuffc))
  896.     uip=substr(loginbuffc,position+1)
  897.     posii=(position-position1)-1
  898.     anzahlcop=(substr(loginbuffc,position1+1,posii))-1
  899.     if anzahlcop<=0 then anzahlcop=0
  900.     ttz=0;ttz=substr(loginbuffc,1,2);itz=ttz;otz=itz
  901.     izh="00";ozh="00";izm="00";ozm="00";izs="00";ozs="00"
  902.     tjz=0;tjz="19"substr(loginbuffc,7,2);ijz=tjz;ojz=tjz
  903.     tmz=0;tmz=substr(loginbuffc,4,2);imz=tmz;omz=tmz
  904.     dattl=tjz
  905.     itn=0;otn=0
  906.     vbm=upper(word(monn,tmz));imn=vbm;omn=vbm
  907.     end
  908.     interpret reziprog
  909. if format="OCPRO" then do
  910.     position=(pos(")",loginbuffr))
  911.     position1=(pos("(",loginbuffr))
  912.     position2=(pos("]",loginbuffr))
  913.     position3=(pos("[",loginbuffr))
  914.     uip=substr(loginbuffr,position+1,position3-(position+1))
  915.     posii=(position-position1)-1
  916.     anzahlcop=(substr(loginbuffr,position1+1,posii))-1
  917.     if anzahlcop<=0 then anzahlcop=0
  918.     posiii=(position2-position3)-1
  919.     onlinecop=(substr(loginbuffr,position3+1,posiii))
  920.     ttz=0
  921.     ttz=substr(loginbuffr,1,2)
  922.     itz=ttz
  923.     otz=itz
  924.     izh="00";ozh="00";izm="00";ozm="00";izs="00";ozs="00"
  925.     tjz=0;tjz="19"substr(loginbuffr,7,2);ijz=tjz;ojz=tjz
  926.     tmz=0;tmz=substr(loginbuffr,4,2);imz=tmz;omz=tmz
  927.     dattl=tjz
  928.     itn=0;otn=0
  929.     vbm=upper(word(monn,tmz));imn=vbm;omn=vbm
  930.     if index(loginbuffr,"{")~=0 then do
  931.     bosition2=(pos("}",loginbuffr))
  932.     bosition3=(pos("{",loginbuffr))
  933.     posiiii=(bosition2-bosition3)-1
  934.     kompzzgcop=(substr(loginbuffr,bosition3+1,posiiii))
  935.     end
  936.     end
  937. if format="SIGNED" then do
  938.     signo=1;anzsigno=0
  939.     position=(pos(")",loginbuffp))
  940.     position1=(pos("(",loginbuffp))
  941.     position2=(pos("]",loginbuffp))
  942.     position3=(pos("[",loginbuffp))
  943.     uip=substr(loginbuffp,position+1,position3-(position+1))
  944.     posii=(position-position1)-1
  945.     anzahlcop=(substr(loginbuffp,position1+1,posii))-1
  946.     if anzahlcop<=0 then anzahlcop=0
  947.     anzahlsignedcopy=anzahlcop
  948.     posiii=(position2-position3)-1
  949.     onlinecop=(substr(loginbuffp,position3+1,posiii))
  950.     kompzzgcop=0
  951. if tonlinezzg=1 then if index(loginbuffp,"{")~=0 then do
  952.     bosition2=(pos("}",loginbuffp))
  953.     bosition3=(pos("{",loginbuffp))
  954.     posiiii=(bosition2-bosition3)-1
  955.     kompzzgcop=(substr(loginbuffp,bosition3+1,posiiii))
  956.     end
  957.     ttz=0
  958.     ttz=substr(loginbuffp,1,2)
  959.     itz=ttz
  960.     otz=itz
  961.     izh="00";ozh="00";izm="00";ozm="00";izs="00";ozs="00"
  962.     tjz=0;tjz="19"substr(loginbuffp,7,2);ijz=tjz;ojz=tjz
  963.     tmz=0;tmz=substr(loginbuffp,4,2);imz=tmz;omz=tmz
  964.     dattl=tjz
  965.     itn=0;otn=0
  966.     vbm=upper(word(monn,tmz));imn=vbm;omn=vbm
  967.     end
  968.  
  969.  
  970.     doit=0
  971.     take=0;neuermonat=0;vcm=0;vbm=upper(vbm);md=upper(md);titlej=0
  972.     mdz=mdzbak
  973.  
  974. if berechtag~=0 then do
  975.         if admdz>=berechtag then do
  976.             neuermonat=mdz+1
  977.             if neuermonat>12 then neuermonat=1
  978.             if berechtag=1 then neuermonat=mdz
  979.             vcm=upper(word(monn,neuermonat))
  980.             end
  981.         if admdz<berechtag then do
  982.             mdz=mdz-1
  983.             if mdz<1 then mdz=12
  984.             gumble=mdz+1;if gumble>12 then gumble=1
  985.             vcm=upper(word(monn,gumble))
  986.             neuermonat=gumble
  987.             end
  988.     md=upper(word(monn,mdz))
  989.     if dattt=dattl then titlej=1    /* Jahreszahl vergleichen */
  990.     if dattt=dattl+1 then titlej=1
  991.     if titlej=0 then title=0
  992.  
  993.     if vbm=md then do
  994.         if itz>=berechtag then take=1
  995.         end
  996.     if vbm=vcm then do
  997.         if itz<berechtag then take=1
  998.          end
  999.     end
  1000.  
  1001. if berechtag=0 then do
  1002.     if dattt~=dattl then title=0    /* Jahreszahl vergleichen */
  1003.     if upper(vbm)=upper(md) then take=1    /* Monat vergleichen */
  1004.     end
  1005.     if format="OC" then if vbm~=md then uip=0    /* Sonderparameter */
  1006.     if title=1 then if take=1 then doit=1
  1007.  
  1008.     if doit=0 then do
  1009.         if format="SIGNED" then do 
  1010.             kompzzgcop=0
  1011.             end
  1012.         zop=1
  1013.         onlinecop="00:00:00"
  1014.         end
  1015.     if format="SIGNED" then if doit=0 then do
  1016.             uip=0
  1017.             anzahlcop=0
  1018.             kompzzgcop=0
  1019.             onlinecop="00:00:00"
  1020.             end
  1021.  
  1022.     if doit=1 then do
  1023.  
  1024.     if format~="SIGNED" then do
  1025.         anzahl=anzahl+1
  1026.         anzsigno=anzsigno+1
  1027.         end
  1028.  
  1029.     zsl=0
  1030.     fud=1
  1031.     i=0
  1032. if opti=1 then do
  1033.     if format="MIAMI" then do
  1034.     call writeln(loge,"Online: "loginbuff)
  1035.     call writeln(loge,"Active Offline: "logoutbuff)
  1036.     end
  1037.         if format="NCOMM" then do
  1038.         call writeln(loge,"Online: "itz"."imz"."ijz" "izh":"izm":"izs" ("Zwischen")") 
  1039.         call writeln(loge,"Active Offline: "otz"."omz"."ojz" "ozh":"ozm":"ozs)
  1040.         end
  1041.             if format="OC" then do
  1042.             call writeln(loge,"OC:"loginbuffo)
  1043.             end
  1044.                 if format="MICRODOT" then do
  1045.                 call writeln(loge,"Online: "itz"."imz"."ijz" "izh":"izm":"izs)
  1046.                 call writeln(loge,"Active Offline: "otz"."omz"."ojz" "ozh":"ozm":"ozs)
  1047.                 end
  1048.             if format="OCP" then do
  1049.             call writeln(loge,"OCP:"date("E")"("anzahl")"uip)
  1050.             end
  1051.         if format="OCPro" then do
  1052.         call writeln(loge,"OCPro:"date("E")"("anzahl")"uip"["onlinecop"]{"kompzzg"}")
  1053.         end
  1054.     end
  1055. imz=0
  1056. do forever
  1057.     i=i+1
  1058.     if i>13 then leave
  1059.     if upper(word(monn,i))=upper(imn) then leave
  1060.     end
  1061.     imz=i
  1062.     i=0
  1063.     omz=0
  1064. do forever
  1065.     i=i+1
  1066.     if i>13 then leave
  1067.     if upper(word(monn,i))=upper(omn) then leave
  1068.     end
  1069.     omz=i
  1070.     i=0
  1071.     ii=words(WoendT)+1
  1072.     fthi=0
  1073. do forever
  1074.     i=i+1
  1075.     if i>=ii then leave
  1076.     if upper(word(WoendT,i))=upper(itn) then fthi=1
  1077.     end
  1078.     gimz=""
  1079.     if length(imz)=1 then gimz="0"
  1080.     vergl=itz"."gimz||imz
  1081.     i=0
  1082.     ii=words(SonderT)+1
  1083. do forever
  1084.     i=i+1
  1085.     if i>=ii then leave
  1086.     if (word(SonderT,i))=upper(vergl) then fthi=1
  1087.     end
  1088.     EZT=izh""izm""izs
  1089.     if ozh<izh then ozh=ozh+24
  1090.     AZT=ozh""ozm""ozs
  1091.     sum=0
  1092.     add=0
  1093.     sum2=0
  1094.     getop=0
  1095.     if fthi=1 then do
  1096.         fzt1=samzt1
  1097.         fzt2=samzt2
  1098.         fzt3=samzt3
  1099.         fzt4=samzt4
  1100.         fzt5=samzt5
  1101.         fzt6=samzt6
  1102.         fzt7=samzt7
  1103.         end
  1104.     if fthi=0 then do
  1105.             fzt1=zt1
  1106.             fzt2=zt2
  1107.             fzt3=zt3
  1108.             fzt4=zt4
  1109.             fzt5=zt5
  1110.             fzt6=zt6
  1111.         fzt7=zt7
  1112.             end
  1113.         OZIgs=0
  1114.         OZOgs=0
  1115.     if EZT~=0 then do
  1116.         OZIgs=(izh*3600)+(izm*60)+izs
  1117.         end
  1118.     if AZT~=0 then do
  1119.         OZOgs=(ozh*3600)+(ozm*60)+ozs
  1120.         end
  1121.         if OZOgs<OZIgs then OZOGS=OZOgs+86400
  1122.         OZges=OZOgs-OZIgs
  1123.                 
  1124.     secont1=0
  1125.     secont2=0
  1126.     secont3=0
  1127.     interpret reziprog
  1128.     ezs=(substr(ezt,1,2)*3600)+(substr(ezt,3,2)*60)+(substr(ezt,5,2))
  1129.     azs=(substr(azt,1,2)*3600)+(substr(azt,3,2)*60)+(substr(azt,5,2))
  1130.  
  1131.     if ezs<86400 then tarifv=fzt4
  1132.     if ezs<75600 then tarifv=fzt3
  1133.     if ezs<64800 then tarifv=fzt2
  1134.     if ezs<43200 then tarifv=fzt7
  1135.     if ezs<32400 then tarifv=fzt1
  1136.     if ezs<18000 then tarifv=fzt5
  1137.     if ezs<7200 then tarifv=fzt6
  1138.  
  1139.     if EZs<7200 then if AZs>7200 then do
  1140.         teil1=7200-(izs+(izm*60)+(izh*3600))
  1141.         tarifv=fzt6
  1142.         getop=1
  1143.     end
  1144.         if EZs<18000 then if EZs >7200 then if azs>18000 then do
  1145.         teil1=18000-(izs+(izm*60)+(izh*3600))
  1146.         tarifv=fzt5
  1147.         getop=1
  1148.     end
  1149.         if EZs<32400 then if EZs >18000 then if azs>32400 then do
  1150.         teil1=32400-(izs+(izm*60)+(izh*3600))
  1151.         tarifv=fzt1
  1152.         getop=1
  1153.     end
  1154.         if EZs<43200 then if EZs >32400 then if azs>43200 then do
  1155.         teil1=43200-(izs+(izm*60)+(izh*3600))
  1156.         tarifv=fzt7
  1157.         getop=1
  1158.     end
  1159.         if EZs<64800 then if EZs >43200 then if azs>64800 then do
  1160.         teil1=64800-(izs+(izm*60)+(izh*3600))
  1161.         tarifv=fzt2
  1162.         getop=1
  1163.     end
  1164.         if EZs<75600 then if EZs >64800 then if azs>75600 then do
  1165.         teil1=75600-(izs+(izm*60)+(izh*3600))
  1166.         tarifv=fzt3
  1167.         getop=1
  1168.     end
  1169.         if EZs<86400 then if EZs >75600 then if azs>86400 then do
  1170.         teil1=86400-(izs+(izm*60)+(izh*3600))
  1171.         tarifv=fzt4
  1172.         getop=1
  1173.     end
  1174.         if getop=1 then do
  1175.             secont1=((trunc((teil1/tarifv)+0.5))*TFpfg)
  1176.             end
  1177.         getop=0
  1178.  
  1179.         if AZs<18000 then if AZs >7200 then if EZs<7200 then do
  1180.         teil3=(ozs+(ozm*60)+(ozh*3600))-7200
  1181.         tarifv=fzt5
  1182.         getop=1
  1183.     end
  1184.         if AZs<32400 then if AZs >18000 then if EZs<18000 then do
  1185.         teil3=(ozs+(ozm*60)+(ozh*3600))-18000
  1186.         tarifv=fzt1
  1187.         getop=1
  1188.     end
  1189.         if AZs<43200 then if AZs >32400 then if EZs<32400 then do
  1190.         teil3=(ozs+(ozm*60)+(ozh*3600))-32400
  1191.         tarifv=fzt7
  1192.         getop=1
  1193.     end
  1194.         if AZs<64800 then if AZs >43200 then if EZs<43200 then do
  1195.         teil3=(ozs+(ozm*60)+(ozh*3600))-43200
  1196.         tarifv=fzt2
  1197.         getop=1
  1198.     end
  1199.         if AZs<75600 then if AZs >64800 then if EZs<64800 then do
  1200.         teil3=(ozs+(ozm*60)+(ozh*3600))-64800
  1201.         tarifv=fzt3
  1202.         getop=1
  1203.     end
  1204.         if AZs<86400 then if AZs >75600 then if EZs<75600 then do
  1205.         teil3=(ozs+(ozm*60)+(ozh*3600))-75600
  1206.         tarifv=fzt4
  1207.         getop=1
  1208.     end
  1209.         if AZs>86400 then if EZs<86400 then do
  1210.         teil3=(ozs+(ozm*60)+(ozh*3600))-86400
  1211.         tarifv=fzt6
  1212.         getop=1
  1213.     end
  1214.         if getop=1 then do
  1215.             secont3=((trunc((teil3/tarifv)+0.5))*TFpfg)
  1216.             end
  1217.         getop=0
  1218.     if EZs<7200 then if azs >18000 then add=add+((10800/zt5)*tfpfg)
  1219.     if EZs<18000 then if azs >32400 then add=add+((14400/zt1)*tfpfg)
  1220.     if EZs<32400 then if azs >43200 then add=add+((10800/zt1)*tfpfg)
  1221.     if EZs<43200 then if azs >64800 then add=add+((21600/zt2)*tfpfg)
  1222.     if EZs<64800 then if azs >75600 then add=add+((10800/zt3)*tfpfg)
  1223.     if EZs<75600 then if azs >86400 then add=add+((10800/zt4)*tfpfg)
  1224. if format~="SIGNED" then if format~="OCPRO" then if secont1=0 then do
  1225.         if secont3=0 then secont2=trunc((((ozs-izs)+((ozm*60)-(izm*60))+((ozh*3600)-(izh*3600)))/tarifv)+1)*tfpfg
  1226.         Zsecont2=trunc((((ozs-izs)+((ozm*60)-(izm*60))+((ozh*3600)-(izh*3600))))+1)
  1227.         end
  1228.     interpret reziprog
  1229.     neuegeb=0
  1230. if zusatzgeb=1 then if doit=1 then do
  1231.         neuegeb=0
  1232.         mmxm=trunc(ozges/60)
  1233.         btxt1=0;btxt2=0
  1234.     if index(Tonlinetage1,ITN)~=0 then do
  1235.         btxt1=Tonline1t1
  1236.         btxt2=Tonline1t2
  1237.         end
  1238.     if index(Tonlinetage2,ITN)~=0 then do
  1239.             btxt1=Tonline2t1
  1240.             btxt2=Tonline2t2
  1241.             end
  1242.         neuegeb=(mmxm+1)*btxt2
  1243.     if EZT>080000 then if EZT<180000 then do
  1244.         neuegeb=(mmxm+1)*btxt1
  1245.         end
  1246.         add=add+(neuegeb*100)
  1247.     end
  1248.     kompzzg1=kompzzg1+(neuegeb)+kompzzgcop ;kompzzgcop=0
  1249.     kompzzg=trunc(kompzzg1,2)
  1250.  
  1251.     SMZsec=SMZsec+OZges
  1252.     SMpfg=(secont1+add+secont2+secont3)
  1253.     if format~="SIGNED" then SMdm=SMpfg/100
  1254.     Gpfg=Gpfg+SMpfg
  1255.     gdmg=trunc((gpfg/100),2)
  1256.  
  1257.     smzh=trunc(SMZsec/60/60)
  1258.     smzm=trunc(smzsec/60)-(smzh*60)
  1259.     smzs=smzsec-(smzm*60)-(smzh*3600)
  1260.     if length(smzh)=1 then smzh="0"smzh
  1261.     if length(smzm)=1 then smzm="0"smzm
  1262.     if length(smzs)=1 then smzs="0"smzs
  1263.  
  1264.     if onlinecop~="00:00:00" then do
  1265.         snzh=substr(onlinecop,1,2)
  1266.         snzm=substr(onlinecop,4,2)
  1267.         snzs=substr(onlinecop,7,2)
  1268.         SMZsec=SMZsec+(snzh*60*60)+(snzm*60)+snzs
  1269.             smzh=trunc(SMZsec/60/60)
  1270.             smzm=trunc(smzsec/60)-(smzh*60)
  1271.             smzs=smzsec-(smzm*60)-(smzh*3600)
  1272.             if length(smzh)=1 then smzh="0"smzh
  1273.             if length(smzm)=1 then smzm="0"smzm
  1274.             if length(smzs)=1 then smzs="0"smzs
  1275.         end
  1276.     interpret reziprog
  1277.     KOMPonline=smzh":"smzm":"smzs
  1278.     ozu="";call ONLtest
  1279.     statt="RUNNING";call plugin
  1280. ENDRECH:
  1281.     end
  1282.     end
  1283.     anzahlbak=anzahl
  1284.     anzahl=anzahl+anzahlcop
  1285.     gdm=trunc(gdmg+uip+zsgeb+Inetgeb,2)
  1286.     gdm1=trunc(gdmg+uip,2)
  1287.     nrek1=0;nrek2=0;nrek3=0;nrek4=0
  1288.     if ONLreq=1 then if nrek=1 then do
  1289.         nONLINEtime=SMZsec
  1290.         nrek3=1
  1291.         end
  1292.     if nreq=1 then if nrek=1 then do
  1293.         nsecond=gdm
  1294.         nrek4=1
  1295.         end
  1296.     if nrek3=1 then nrek=2
  1297.     if nrek4=1 then nrek=2
  1298.     if ONLreq=1 then if nrek=0 then do
  1299.         ONLINEtime=SMZsec
  1300.         nrek1=1
  1301.         end
  1302.     if nreq=1 then if nrek=0 then do
  1303.         nfirst=gdm
  1304.         nrek2=1
  1305.         end
  1306.     if nrek1=1 then nrek=1
  1307.     if nrek2=1 then nrek=1
  1308.         if nrek=2 then signal bigend
  1309.     fud=0
  1310.     Call Close(l);
  1311.     statt="END";call plugin
  1312. /* Text generierung */
  1313.  
  1314.     call MAKETEXT
  1315.  
  1316. DMflag=1
  1317. if gdm>=(MADM+schlupf) then DMflag=0
  1318. if gdm>=MADM then if gdm<=(MADM+schlupf) then DMflag=2
  1319. if gdm>(MADM-rwarn) then if gdm<MADM then DMflag=3
  1320.  
  1321. if ONLwarn=1 then do
  1322.     if ONLflag=0 then req=1
  1323.     if ONLflag=2 then req=1
  1324.         end
  1325.  
  1326. if flag=1 then if dmflag~=1 then req=1
  1327.     interpret reziprog
  1328. if req=1 then do
  1329.     ee1=outtitel||NL||OUTkostenbisher||NL
  1330.     if DMflag=0 then ee1=ee1||OUTueberschritten||NL
  1331.     if DMflag=3 then ee1=ee1||OUTdanger||NL||OUTprozentDM||NL||OUTnochfrei||NL
  1332.     if DMflag=2 then ee1=ee1||OUTueberschritten||NL
  1333.     if DMflag=1 then ee1=ee1||OUTnochfrei||NL
  1334.  
  1335.     if ONLwarn=1 then ee1=ee1||OUTzeit||NL
  1336.     zweitvar=1
  1337.     if zweitvar=1 then if DMflag=0 then zweitvar=0
  1338.     if zweitvar=1 then if ONLwarn=1 then if ONLflag=0 then zweitvar=0
  1339.     if zweitvar=1 then if DMflag=2 then zweitvar=2
  1340.     if zweitvar=1 then if ONLwarn=1 then if ONLflag=2 then zweitvar=2
  1341.  
  1342. if muireq=1 then do
  1343.     if show("p",MUIPORT) =0 then do
  1344.         address command muirun" "muinil" "MUIPFAD
  1345.         MUIstart=1
  1346.         end
  1347.     end
  1348.  
  1349.     if zweitvar=1 then do
  1350.         if nomi=1 then ee1=ee1||OUTstarte
  1351.         call SOUNDWARTE
  1352.         call REQJA
  1353.         call SOUNDJA
  1354.         end
  1355.     if zweitvar=0 then do
  1356.         if nomi=1 then ee1=ee1||OUTnichtstart
  1357.         call SOUNDWARTE
  1358.         call REQNEIN
  1359.         call SOUNDNEIN
  1360.         nomi=0
  1361.         if security=1 then do
  1362.             stinfo=1
  1363.             call startschutz
  1364.             stinfo=0
  1365.             if startschutz=1 then call startschutz
  1366.             end
  1367.         end
  1368.     if zweitvar=2 then do
  1369.         if nomi=1 then ee1=ee1||OUTnichtstart
  1370.         call SOUNDWARTE
  1371.         call REQVIELEICHT
  1372.         call SOUNDVIELEICHT
  1373.         end
  1374. end
  1375.  
  1376. endegut:
  1377. if turbob=1 then if anzahlbak>=grenz then do
  1378.     call close(loge)
  1379.     call open(loge,temp"Optilog.log","W")
  1380.     call writeln(loge,"OCPro:"date("E")"("anzahl")"gdm1"["komponline"]{"kompzzg"}")
  1381.     zop=1
  1382.     end
  1383. call close(loge)
  1384.     if opti=1 then if zop=1 then address command copyb" FROM "temp"Optilog.log TO "logb
  1385.     if exists(temp"optilog.log") then address command deleb" "nilib" "temp"optilog.log"
  1386.  
  1387.     if nrek=1 then signal sttt
  1388.     if onlreq=1 then signal sttt
  1389.     /* prg welches bei verweigerung gestartet wird. */
  1390.     if nomi=0 then if nottot=1 then address command starbef" "nostartprg
  1391.     if exists(temp"OC_logfile.temp") then address command deleb" "nilib" "temp"OC_logfile.temp"
  1392.     exit
  1393.  
  1394. bigend:
  1395.     if normrech=1 then call neuschreiben
  1396.     if nreq=1 then do
  1397.         Letzter=nsecond-nfirst
  1398.         if letzter<=0 then exit
  1399.         end
  1400.  
  1401.     if ONLreq=1 then do
  1402.         TIMEonline=nONLINEtime-ONLINEtime
  1403.         if TIMEonline<=0 then exit
  1404.         end
  1405.  
  1406.     if ONLreq=1 then do
  1407.         smzh=trunc(TIMEonline/60/60)
  1408.         smzm=trunc(TIMEonline/60)-(smzh*60)
  1409.         smzs=TIMEonline-(smzm*60)-(smzh*3600)
  1410.         if length(smzh)=1 then smzh="0"smzh
  1411.         if length(smzm)=1 then smzm="0"smzm
  1412.         if length(smzs)=1 then smzs="0"smzs
  1413.         Eplus=smzh":"smzm":"smzs
  1414.         end
  1415.     if ONLreq=0 then do
  1416.         sst="";Eplus=""
  1417.         end
  1418.     if nreq=0 then do
  1419.         ssq="";letzter="";ssr="";sss=""
  1420.         end
  1421.     Texx1=ssq||letzter" "ssr||nl||sst||eplus
  1422.     stic1="Sie haben noch "Madm-GDM" DM zur freien Verfügung."nl
  1423.     stic2=""
  1424.     if gdm>0.31 then stic2="Bisherige Durchschnittskosten :"trunc((GDM/31),2)" DM/pro Tag"
  1425.  
  1426.     if madm<gdm then do
  1427.         stic1="Sie haben Ihr Limit schon um "gdm-madm" DM überzogen."nl
  1428.         end
  1429.     texx2=sss||nl||stic1||stic2
  1430.     CALL rtezrequest(texx1||NL||texx2,,plopp,docenter dofont respoo)
  1431.     if exists(temp"OC_logfile.temp") then address command deleb" "nilib" "temp"OC_logfile.temp"
  1432.     exit
  1433.  
  1434. STTT:
  1435.     abcintern=0
  1436.     if nomi=1 then call pragma("STACK",stacky)
  1437.     if nreq=1 then abcintern=1
  1438.     if ONLreq=1 then abcintern=1
  1439.     if abcintern=0 then if normrech=1 then if nrek=1 then call NEUSCHREIBEN
  1440.     if nomi=1 then do
  1441.         stinfo=1;call startschutz;stinfo=0
  1442.         if startschutz=2 then call startschutz
  1443.         end
  1444.     if nomi=1 then address command ''RUN' 'NIL' 'miami''
  1445.     if nreq=1 then signal secondus
  1446.     if ONLreq=1 then signal secondus
  1447.     exit
  1448.  
  1449. ONLtest:
  1450. if ONLwarn=1 then do
  1451. /* ONLINE bisher: */
  1452.     if SMZsec<(ONLlimit-ONLschwelle) then do
  1453.         DF0=komponline
  1454.         ozu=ssu" "df0" / "ONLlimitout" Limit"
  1455.         ONLflag=1
  1456.         end
  1457. /* LIMIT Überschritten  */
  1458.     if SMZsec>ONLlimit then do
  1459.         df1=smzsec-onllimit
  1460.         dmzh=trunc(DF1/60/60)
  1461.         dmzm=trunc(DF1/60)-(dmzh*60)
  1462.         dmzs=DF1-(dmzm*60)-(dmzh*3600)
  1463.         if length(dmzh)=1 then dmzh="0"dmzh
  1464.         if length(dmzm)=1 then dmzm="0"dmzm
  1465.         if length(dmzs)=1 then dmzs="0"dmzs
  1466.         DF1=dmzh":"dmzm":"dmzs
  1467.             OZu=ssy" "DF1" "ssz
  1468.         ONLflag=0
  1469.             end
  1470. /* Grenzschwelle erreicht */
  1471.     if SMZsec>(ONLlimit-ONLschwelle) then if SMZsec<ONLlimit then do
  1472.         DF2=onllimit-smzsec
  1473.         dmzh=trunc(DF2/60/60)
  1474.         dmzm=trunc(DF2/60)-(dmzh*60)
  1475.         dmzs=DF2-(dmzm*60)-(dmzh*60*60)
  1476.         if length(dmzh)=1 then dmzh="0"dmzh
  1477.         if length(dmzm)=1 then dmzm="0"dmzm
  1478.         if length(dmzs)=1 then dmzs="0"dmzs
  1479.         DF2=dmzh":"dmzm":"dmzs
  1480.         OZU=ssv" "DF2" "ssw" / "ONLlimitout" Limit"
  1481.         ONLflag=2
  1482.         end
  1483.     end    
  1484.     return OZu
  1485.  
  1486. /* Requester Ausgabe mit OK Button */
  1487. REQJA:    
  1488.     if MUIreq=0 then CALL rtezrequest(ee1,sds,bvd" OC V"VERZ" "ssk" "REGNAME,docenter dofont)
  1489.     if MUIreq=1 then call MUIreqja
  1490.     return
  1491.  
  1492. /* Requester Ausgabe mit STARTE TROTZDEM & Schade Button */
  1493. REQVIELEICHT:
  1494.     if MUIreq=0 then CALL rtezrequest(ee1,sdo"|"sdd"",bvd"  OC V"VERZ" "ssk" "REGNAME,docenter dofont respoo)
  1495.     if MUIreq=0 then if result=1 then nomi=0
  1496.     if MUIreq=1 then call MUIreqvieleicht
  1497.     if MUIreq=1 then if resultmui=1 then nomi=0
  1498.     return
  1499.  
  1500. /* Requester Ausgabe mit SCHADE Button */
  1501. REQNEIN:
  1502.     if MUIreq=0 then CALL rtezrequest(ee1,sdn,bvd"  OC V"VERZ" "ssk" "REGNAME,docenter dofont respoo)
  1503.     if MUIreq=1 then call MUIreqnein
  1504.     return
  1505.  
  1506. SOUNDJA:    
  1507.     sti=1    
  1508.     if playit=1 then if mpx3~="" then address command rpx" "mpx" "nipx" "mpx3
  1509.     return
  1510.  
  1511. SOUNDNEIN:
  1512.     sti=2
  1513.     if playit=1 then if mpx4~="" then address command rpx" "mpx" "nipx" "mpx4
  1514.     return
  1515.  
  1516. SOUNDwarte:
  1517.     if playit=1 then if mpx5~="" then address command rpx" "mpx" "nipx" "mpx5
  1518.         call time("R")
  1519.         if vpx>0 then do forever
  1520.             if time("E")>=vpx then leave
  1521.             end
  1522.     return
  1523.  
  1524. SOUNDvieleicht:
  1525.     sti=2
  1526.     if result=0 then sti=1
  1527.     if playit=1 then do
  1528.         if (gdm-madm)<schlupf then do
  1529.             if sti=1 then if mpx1~="" then address command rpx" "mpx" "nipx" "mpx1
  1530.             if sti~=1 then if mpx2~="" then address command rpx" "mpx" "nipx" "mpx2
  1531.             end
  1532.         end
  1533.     return
  1534.  
  1535. /* Texte Generierung für Ausgabe */
  1536. MAKETEXT:
  1537.     PROZ=trunc((100/MADM)*gdm)
  1538. if berechtag~=0 then do
  1539.     berech2=berechtag-1
  1540.     if berech2<1 then berech2=31
  1541.     if neuermonat=2 then if berech2>28 then berech2=28
  1542.     aktdatum="["berechtag"."mdz".-"berech2"."neuermonat".]"
  1543.     OLA=aktdatum
  1544.     end
  1545.     logtipos=reverse(log)
  1546.     logtipos1=pos("/",logtipos)
  1547.         if logtipos1=0 then logtipos1=pos(":",logtipos)
  1548.     logtimin=length(log)
  1549.     logtirt=logtimin-logtipos1
  1550.     logrest=substr(log,logtirt+2)
  1551.     logtitel=ssbd||logrest||ssbe
  1552. if aust=0 then do
  1553.     kom1=ssa" "madm" "ssb" "ola
  1554.     kom2=ssc" "gdm" "ssd" "anzahl" "sse
  1555.     kom21=ssac" "kompzzg" "ssbc
  1556.     kom3=ssf" "madm-gdm" "ssg" "ola" "ssh
  1557.     kom4="! ACHTUNG !"
  1558.     kom5=ssi" "proz" "ssj
  1559.     kom6=ssp" "miami
  1560.     kom7=ssl" "gdm-madm" "ssm
  1561.     kom8=ssn" "miami" "sso
  1562.     OUTtitel=logtitel||nl||kom1
  1563.     OUTkostenbisher=kom2
  1564.     if tonlinezzg=1 then OUTkostenbisher=OUTkostenbisher||nl||kom21
  1565.     OUTnochfrei=kom3
  1566.     OUTdanger=kom4
  1567.     OUTprozentDM=kom5
  1568.     OUTstarte=kom6
  1569.     OUTueberschritten=kom7
  1570.     OUTnichtstart=kom8
  1571.     end
  1572. if aust=0 then signal KR22
  1573.  
  1574.     if kom1="" then signal kb1
  1575.     er1="";l=length(kom1);i1=0
  1576. do i = 1 to l ;g1=""
  1577.     e1=substr(kom1,i,1);g1=substr(kom1,i,3)
  1578.     call textsch
  1579.     end
  1580. kb1:
  1581.     OUTtitel=logtitel||nl||er1
  1582.     ee2=ssc" "gdm" "ssd" "anzahl" "sse
  1583.     if kom2="" then signal kb2
  1584.     er1="";l=length(kom2);i1=0
  1585. do i = 1 to l ;g1=""
  1586.     e1=substr(kom2,i,1);g1=substr(kom2,i,3)
  1587.     call textsch
  1588.     end
  1589. kb2:
  1590.     OUTkostenbisher=er1
  1591.     ee3=ssf" "MADM-gdm" "ssg" "OLA" "ssh
  1592.     if kom3="" then signal kb3
  1593.     er1=""
  1594.     l=length(kom3)
  1595.     i1=0
  1596. do i = 1 to l 
  1597.     g1=""
  1598.     e1=substr(kom3,i,1)
  1599.     g1=substr(kom3,i,3)
  1600.     call textsch
  1601.     end
  1602. kb3:
  1603.     OUTnochfrei=er1
  1604.     PROZ=trunc((100/MADM)*gdm)
  1605.     ff3="*** DANGER ! ***"
  1606.     ff4=ssi" "PROZ" "ssj
  1607.     if kom4="" then signal kp3
  1608.     er1=""
  1609.     l=length(kom4);i1=0
  1610. do i = 1 to l 
  1611.     g1=""
  1612.     e1=substr(kom4,i,1)
  1613.     g1=substr(kom4,i,3)
  1614.     call textsch
  1615.     end
  1616. kp3:
  1617.     OUTdanger=er1
  1618.     if kom5="" then signal kz3
  1619.     er1=""
  1620.     l=length(kom5)
  1621.     i1=0
  1622. do i = 1 to l 
  1623.     g1=""
  1624.     e1=substr(kom5,i,1)
  1625.     g1=substr(kom5,i,3)
  1626.     call textsch
  1627.     end
  1628. kz3:
  1629.     OUTprozentDM=er1
  1630.     ee4=""
  1631.     if kom3="" then signal kg1
  1632.     er1=""
  1633.     l=length(kom6)
  1634.     i1=0
  1635. do i = 1 to l ;g1=""
  1636.     e1=substr(kom6,i,1)
  1637.     g1=substr(kom6,i,3)
  1638.     call textsch
  1639.     end
  1640. kg1:
  1641.     OUTstarte=er1
  1642.     ee3=ssl" "gdm-MADM" "ssm
  1643.     ee4=ssn||Miami||sso
  1644.     if kom7="" then signal kr1
  1645.     er1=""
  1646.     l=length(kom7)
  1647.     i1=0
  1648. do i = 1 to l 
  1649.     g1=""
  1650.     e1=substr(kom7,i,1)
  1651.     g1=substr(kom7,i,3)
  1652.     call textsch
  1653.     end
  1654. kr1:
  1655.     OUTueberschritten=er1
  1656.     if kom8="" then signal kr2
  1657.     er1=""
  1658.     l=length(kom8)
  1659.     i1=0
  1660. do i = 1 to l 
  1661.     g1=""
  1662.     e1=substr(kom8,i,1)
  1663.     g1=substr(kom8,i,3)
  1664.     call textsch
  1665.     end
  1666. kr2:
  1667.     OUTnichtstart=er1
  1668. KR22:
  1669.     call ONLtest
  1670.     OUTZeit=OZu
  1671.     return
  1672.  
  1673. /* Fehler Ausgabe */
  1674. LRO1:
  1675.     CALL rtezrequest(TRITT||NL||NL||uug||NL||NL||uuh||NL||uui||NL||NL||uuj,,plopp,docenter dofont respoo)
  1676.     exit
  1677. LRO2:
  1678.     CALL rtezrequest(TRITT||NL||NL||uuk||NL||NL||uua||log||uub||NL||NL||uuh||NL||uul||NL||NL||uuj,,plopp,docenter dofont respoo)
  1679.     exit
  1680. MRO2:
  1681.     CALL rtezrequest(TRITT||NL||NL||uum||NL||NL||uua||MIAMI||uub||NL||NL||uuh||NL||uul||NL||NL||uuj,,plopp,docenter dofont respoo)
  1682.     exit
  1683. NVI:
  1684.     CALL rtezrequest(TRITT||NL||NL||uun||NL||NL||uua||default||uub||NL||NL||uuo||NL||uup||NL||uuq||NL||NL||uuj,,plopp,docenter dofont respoo)
  1685.     exit
  1686. NOFONT:
  1687.     CALL rtezrequest(TRITT||NL||NL||uur||NL||NL||uus||fontd||uut||sized||uub||NL||NL||uuv||NL||uul||NL||NL||uuj,,plopp,docenter dofont respoo)
  1688.     exit
  1689. PRO2:
  1690.     CALL rtezrequest(TRITT||NL||NL||uuw||NL||NL||uua||mpx||uub||NL||NL||uuh||NL||uul||NL||NL||uuj,,plopp,docenter dofont respoo)
  1691.     exit
  1692. PRO3:
  1693.     CALL rtezrequest(TRITT||NL||NL||uux||NL||NL||uua||rpx||uub||NL||NL||uuh||NL||uul||NL||NL||uuj,,plopp,docenter dofont respoo)
  1694.     exit
  1695. UMBR:
  1696.     CALL rtezrequest(NL||"Catalog File not Found"||NL,,plopp,docenter dofont respoo)
  1697.     exit
  1698. NODAT:
  1699.     CALL rtezrequest(NL||"[S:Online_Check.Dat] not found"||NL,,plopp,docenter dofont respoo)
  1700.     exit
  1701. UMBRRR:
  1702.     CALL rtezrequest(NL||"Wrong Version of Catalogfile"||NL,,plopp,docenter dofont respoo)
  1703.     exit
  1704. UMBRI:
  1705.     CALL rtezrequest(NL||"Error in Catalog File"||NL,,plopp,docenter dofont respoo)
  1706.     exit
  1707. DEUTSCH:
  1708.     if datatype(seriennummer)="CHAR" then keyiti=15
  1709.     if (seriennummer/1024)<9.76 then keyiti=15     
  1710.     if index(emmm,"@")=0 then keyiti=15
  1711.     if length(emmm)<3 then keyiti=15 
  1712.     if length(strmmm)<5 then keyiti=15 
  1713.     if datatype(tel)="CHAR" then keyiti=15 
  1714.     if tel<1000 then keyiti=15 
  1715.     if tel="123456789" then keyiti=15
  1716.     if datatype(plz)="CHAR" then keyiti=15
  1717.     if plz<10 then keyiti=15
  1718.     if datatype(ortmmm)~="CHAR" then keyiti=15
  1719.     if index(regname,"^")~=0 then keyiti=15
  1720.     if index(regname,"SUT")~=0 then keyiti=15
  1721.     if index(regname,"98")~=0 then keyiti=15
  1722.     if index(regname,"97")~=0 then keyiti=15
  1723.     if index(regname,"99")~=0 then keyiti=15
  1724.     return
  1725. OPENNEU:
  1726.     call open(l,log,"R")
  1727.     datlen=seek(l,0,"E")
  1728.     if maxseek~=0 then If datlen>=maxseek then MUSSopt=1
  1729.     if datlen>=65535 then call seek(l,datlen-65535,"B")
  1730.     if datlen<65535 then call seek(l,0,"B")
  1731.     fub=reverse(readch(l,65535))
  1732.     xtpos=pos(searchid,fub)
  1733.     xtlog=reverse(left(fub,xtpos+44))
  1734.     if xtpos=0 then do
  1735.         call close(l)
  1736.         call open(l,log,"R")
  1737.         end
  1738.     if xtpos=0 then return
  1739.     xtlog=reverse(left(fub,xtpos+44))
  1740.     call close(l)
  1741.     call open(l,temp"OC_logfile.temp","w")
  1742.     call writech(l,xtlog)
  1743.     call close(l)
  1744.     call open(l,temp"OC_logfile.temp","R")
  1745.     return
  1746. NEUSCHREIBEN:
  1747.     if mussopt=0 then if signo=1 then if anzsigno=0 then return
  1748.     if anzahlsignedcopy = anzahl+1 then return
  1749.     anzahlplus=anzahl+1;indb="A"
  1750.     if mussopt=1 then indb="W"
  1751.     call open(loge,log,indb);rsearch=reverse(searchid)
  1752.     call writeln(loge,rsearch||date("E")"("anzahlplus")"gdm1"["komponline"]{"kompzzg"}")
  1753.     call close(l)
  1754.     if exists(temp"OC_logfile.temp") then address command deleb" "nilib" "temp"OC_logfile.temp"
  1755.     call close(loge)
  1756.     return
  1757.  
  1758. MUIREQJA:
  1759.     if show("p",muiport) ~= 1 then signal MUIREQJA
  1760.     tempbak=temp
  1761.     call open(mui,temp"mui.temp","w")
  1762.     call writech(mui,ee1)
  1763.     call close(mui);muirexx=muiport
  1764.     call centermui
  1765.     address muirexx
  1766.     request 'TITLE' '"'bvd" OC V"VERZ" "ssk" "REGNAME'"' 'GADGETS' '"'sds'"' FILE '"'temp"mui.temp"'"'
  1767.     resultmui=RESULT
  1768.     if muistart=1 then address MUIREXX quit
  1769.     address command deleb" "nilib" "temp"mui.temp"
  1770.     temp=tempbak
  1771.     return
  1772.  
  1773. MUIREQVIELEICHT:
  1774.     if show("p",muiport) ~= 1 then signal MUIREQVIELEICHT
  1775.     tempbak=temp
  1776.     call open(mui,temp"mui.temp","w")
  1777.     call writech(mui,ee1)
  1778.     call close(mui);muirexx=muiport
  1779.     call centermui
  1780.     address muirexx
  1781.     request 'TITLE' '"'bvd" OC V"VERZ" "ssk" "REGNAME'"' 'GADGETS' '"'sdo'|'sdd'"' FILE '"'temp"mui.temp"'"'
  1782.     resultmui=RESULT
  1783.     if muistart=1 then address MUIREXX quit
  1784.     address command deleb" "nilib" "temp"mui.temp"
  1785.     temp=tempbak
  1786.     return
  1787.  
  1788. MUIREQNEIN:
  1789.     if show("p",MUIport) ~= 1 then signal MUIREQNEIN
  1790.     tempbak=temp
  1791.     call open(mui,temp"mui.temp","w")
  1792.     call writech(mui,ee1)
  1793.     call close(mui);muirexx=muiport
  1794.     call centermui
  1795.     address muirexx
  1796.     request 'TITLE' '"'bvd" OC V"VERZ" "ssk" "REGNAME'"' 'GADGETS' '"'sdn'"' FILE '"'temp"mui.temp"'"'
  1797.     resultmui=RESULT
  1798.     if muistart=1 then address MUIREXX quit
  1799.     address command deleb" "nilib" "temp"mui.temp"
  1800.     temp=tempbak
  1801.     return
  1802. checklenge:
  1803.     call open(ch,temp"mui.temp","R");le2=1
  1804.     do forever
  1805.     buf=readln(ch)
  1806.     If EOF(ch)then leave
  1807.         le1=length(buf)
  1808.         if le2<le1 then le2=le1
  1809.     end
  1810.     call close(ch)
  1811.     call open(ch,temp"mui.temp","R")
  1812.     call open(cc,temp"1.mui.temp","W")
  1813.     do forever
  1814.     buf=readln(ch)
  1815.         buf1=center(buf,le2)
  1816.         call writeln(cc,buf1)
  1817.         If EOF(ch)then leave
  1818.         end
  1819.     call close(cc)
  1820.     call close(ch)
  1821.     return
  1822. centermui:
  1823.     if cennt=1 then do
  1824.         call checklenge
  1825.         address command deleb" "nilib" "temp"mui.temp"
  1826.         temp=temp"1."
  1827.         end
  1828.     return
  1829. schicht:
  1830.     interpret Nulli ;call existerit
  1831.     return
  1832. PLUGIN:
  1833.     if plugin=1 then do
  1834.  
  1835.         call setclip(status,statt)
  1836.         call setclip(PLonMAX,ONLlimitout)
  1837.         call setclip(PLonSCH,ONlschwelle)
  1838.         call setclip(PLonTIME,komponline)
  1839.         call setclip(PLmaxDM,MXDM)
  1840.         call setclip(PLbisDM,gdmg)
  1841.         call setclip(PLindex,history2)
  1842.         call setclip(PLzzgk,kompzzg)
  1843.         call setclip(PLzzgm,neuegeb)
  1844.         call setclip(PLinZ,izh":"izm":"izs)
  1845.         call setclip(PLoutZ,ozh":"ozm":"ozs)
  1846.         call setclip(PLtarif,tarifv)
  1847.  
  1848.         if plug=1 then call "s:ONline_Check.plugin"
  1849.         if plug=2 then call "Rexx:ONline_Check.plugin"
  1850.  
  1851.         statt  =getclip(status)
  1852.         komponline=getclip(PLonTIME)
  1853.         ONLlimitout=getclip(PLonMAX)
  1854.         ONlschwelle=getclip(PLonSCH)
  1855.         MXDM    =getclip(PLmaxDM)
  1856.         gdmg    =getclip(PLbisDM)
  1857.         history2=getclip(PLindex)
  1858.         kompzzg =getclip(PLzzgk)
  1859.         neuegeb =getclip(PLzzgm)
  1860.         PLinZ    =getclip(PLinZ)
  1861.         PLoutZ    =getclip(PLoutZ)
  1862.         tarifv    =getclip(PLtarif)
  1863.         izh=substr(PLinZ,1,2)
  1864.         izm=substr(PLinZ,3,2)
  1865.         izs=substr(PLinZ,5,2)
  1866.         ozh=substr(PLoutZ,1,2)
  1867.         ozm=substr(PLoutZ,3,2)
  1868.         ozs=substr(PLoutZ,5,2)
  1869.         end
  1870.     return
  1871. STARTSCHUTZ:
  1872.     startschutz=0
  1873.     stschfile=word(miami,1)
  1874.     call open(startschutzIN,stschfile,"R")
  1875.     call open(startschutzOUT,temp"OC_save","W")
  1876.     StartschutzMUSTER1="000003f3"
  1877.     StartschutzMUSTER2="ffffffff"
  1878.     buf=readch(startschutzIN,4)
  1879.     xbuf=upper(c2x(buf));if xbuf=upper(StartschutzMUSTER1) then do
  1880.         ybuf=x2c(StartschutzMUSTER2)
  1881.         call writech(startschutzOUT,ybuf)
  1882.         startschutz=1
  1883.         end
  1884.     xbuf=upper(c2x(buf));if xbuf=upper(StartschutzMUSTER2) then do
  1885.         ybuf=x2c(StartschutzMUSTER1)
  1886.         call writech(startschutzOUT,ybuf)
  1887.         startschutz=2
  1888.         end
  1889.     if stinfo=1 then call close(startschutzOUT)
  1890.     if stinfo=1 then call close(startschutzIN)
  1891.     if stinfo=1 then return
  1892.     if startschutz>=1 then do
  1893.         do forever
  1894.             buf=reverse(readch(startschutzIN,65535))
  1895.             if eof(startschutzIN) then leave
  1896.             call writech(startschutzOUT,buf)
  1897.             end
  1898.             call close(startschutzOUT)
  1899.             call close(startschutzIN)
  1900.             call open(startschutzIN,temp"OC_save","R")
  1901.             call open(startschutzOUT,stschfile,"W")
  1902.         do forever
  1903.             buf=readch(startschutzIN,65535)
  1904.             if eof(startschutzIN) then leave
  1905.             call writech(startschutzOUT,buf)
  1906.             end
  1907.             call close(startschutzOUT)
  1908.             call close(startschutzIN)
  1909.         end
  1910.         if exists(temp"OC_save") then address command deleb" "nilib" "temp"OC_save"
  1911. return
  1912.